#!/bin/sh

echo "var count is : $# "

echo "var is $*"
old=$1
new=$2
for file  in $*  ;do
	if [ -f "$file" ]; then
newfile=`echo "$file" | sed -n "s/${old}/${new}/p"`
echo $file
echo "newfile is $newfile"
fi

if [ -f "$newfile" ]; then
echo "error $nefile is exists already"
elif [ -n "$newfile" ]; then
echo "renameing $file to $newfile ....."
mv "$file" "$newfile"
fi


done


